package org.cedar.exceptions;

import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

public class ExceptionCode {
	private static Properties p = new Properties();
	static{
		InputStream is = ExceptionCode.class.getResourceAsStream("message.properties");
		try {
			p.load(is);
		} catch (IOException e) {
			e.printStackTrace();
		}finally{
			try {
				is.close();
			} catch (IOException e) {
				e.printStackTrace();
			}
		}
	}
	public static String getErrorMsg(Integer code){
		return p.getProperty("E"+code.toString()+"."+System.getProperty("user.language"));
	}
	
}
